package com.mrd.gtimp.order.entity;


import com.mrd.gtimp.business.entity.DeclarationModel;

import org.hibernate.annotations.GenericGenerator;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

/**
 * Created by lenovo on 2016/9/18.
 */

/**
 * 集装箱表模板 3.0
 *
 * @author zyy
 */
@Entity(name = "T_BIZ_DECLA_CONTAINER_MODEL")
public class DeclaContainerModel implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 集装箱id
     */
    @Id
    @Column(name = "ID_")
    @GenericGenerator(name = "id", strategy = "uuid")
    @GeneratedValue(generator = "id")
    private String id;

    /**
     * 集装箱号
     */
    @Column(name = "CONTAINER_NO_")
    private String containerNo;

    /**
     * 集装箱规格
     */
    @Column(name = "CONTAINER_STANDARD_")
    private String containerStandard;

    /**
     * 集装箱自重
     */
    @Column(name = "CONTAINER_WEIGHT_")
    private String containerWeight;

    /**
     * 相关报关单模板信息
     */
    @ManyToOne
    @JoinColumn(name = "DECLARATION_Model_ID_")
    private DeclarationModel declaration;

    public DeclaContainerModel() {
    }

    public DeclaContainerModel(DeclaContainer container) {
        this.containerNo = container.getContainerNo();
        this.containerStandard = container.getContainerStandard();
        this.containerWeight = container.getContainerWeight();
    }

    public DeclaContainerModel(String containerNo, String containerStandard, String containerWeight, DeclarationModel declaration) {
        this.containerNo = containerNo;
        this.containerStandard = containerStandard;
        this.containerWeight = containerWeight;
        this.declaration = declaration;
    }

    //     getter/setter
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public DeclarationModel getDeclaration() {
        return declaration;
    }

    public void setDeclaration(DeclarationModel declaration) {
        this.declaration = declaration;
    }

    public String getContainerNo() {
        return containerNo;
    }

    public void setContainerNo(String containerNo) {
        this.containerNo = containerNo;
    }

    public String getContainerWeight() {
        return containerWeight;
    }

    public void setContainerWeight(String containerWeight) {
        this.containerWeight = containerWeight;
    }

    public String getContainerStandard() {
        return containerStandard;
    }

    public void setContainerStandard(String containerStandard) {
        this.containerStandard = containerStandard;
    }
}
